<template>
    <div class="common-layout">
        <el-container>
            <el-aside width="200px">
                <el-menu active-text-color="#ffd04b" background-color="#545c64" class="el-menu-vertical-demo"
                    default-active="2" text-color="#fff" @open="handleOpen" @close="handleClose" :router="true
                    ">
                    <el-sub-menu index="goods">
                        <template #title>
                            <span>商品</span>
                        </template>

                        <el-menu-item index="/Admin/QueryList">商品列表</el-menu-item>
                        <el-menu-item index="/Admin/ListWithPage">添加商品</el-menu-item>
                    </el-sub-menu>

                    <el-sub-menu index="Banner">
                        <template #title>
                            <span>轮播图的管理</span>
                        </template>
                        <el-menu-item index="/Admin/list">轮播图列表</el-menu-item>
                        <el-menu-item index="/Admin/Add">轮播图添加</el-menu-item>
                    </el-sub-menu>

                    <el-sub-menu index="Admin">
                        <template #title>
                            <span>操作人员管理</span>
                        </template>
                        <el-menu-item index="/Admin/AdminList">操作人员列表
                        </el-menu-item>
                        <el-menu-item index="/Admin/AdminAdd">添加操作人员</el-menu-item>
                    </el-sub-menu>
                </el-menu>



            </el-aside>
            <el-container>
                <el-header><h1>管理人员系统</h1></el-header>
                <el-main>
                    <router-view></router-view>
                </el-main>
            </el-container>
        </el-container>
    </div>
</template>
  
  
<script setup lang="ts">
import {
    Document,
    Menu as IconMenu,
    Location,
    Setting,
} from '@element-plus/icons-vue'
const handleOpen = (key: string, keyPath: string[]) => {
    console.log(key, keyPath)
}
const handleClose = (key: string, keyPath: string[]) => {
    console.log(key, keyPath)
}
</script>

<style scoped>
.common-layout {
    width: 100%;
    height: 100%;
}

.el-container {
    width: 100%;
    height: 100%;
}

.el-aside {
    width: 200px;
    height: 100%;
    background-color: rgb(84, 92, 100);
}

.el-header {
    width: 100%;
    height: 120px;
    background-color: rgb(235, 123, 26);
}
</style>